// Jest setup file for database tests

// Mock database connection for tests
jest.mock('../config/database', () => ({
  query: jest.fn(),
  pool: {
    connect: jest.fn(),
    end: jest.fn()
  }
}));

// Mock Redis connection
jest.mock('../config/redis', () => ({
  redis: {
    get: jest.fn(),
    set: jest.fn(),
    del: jest.fn(),
    exists: jest.fn()
  }
}));

// Global test setup
beforeAll(async () => {
  // Setup test database or mock connections
});

afterAll(async () => {
  // Cleanup test database or connections
});

beforeEach(() => {
  // Reset mocks before each test
  jest.clearAllMocks();
});

afterEach(() => {
  // Cleanup after each test
});

// Add a dummy test to prevent "no tests" error
describe('Setup', () => {
  it('should setup test environment', () => {
    expect(true).toBe(true);
  });
});